POV-Ray : Newsgroups : povray.binaries.images : Path with sphere attached. . . : Path with sphere attached. . . Server Time
20 Nov 2024 00:40:50 EST (-0500)
  Path with sphere attached. . .  
From: Arie L  Stavchansky
Date: 21 Oct 2001 09:58:42
Message: <3bd2d492@news.povray.org>
Okay, this note may get a little complicated so forgive me if I confuse you.

I have written a macro that makes stacks of rings of spheres as seen in the
attached image.  The macro adjusts the radius of the spheres in a ring
dependant on the radius of the ring because I wanted to make sure that all
spheres are tangential (touching each other at a tangent).

Now, what I would like to do is at the top of the "cylinder of spheres" is
start to make the rings, but so that every stack of it fits the profile i
have drawn in.  Figuring out what the radius of the ring should be and the y
value of the ring is very difficult for me--especially since the sphere's
radius changes as the ring's radius gets smaller.  I have attempted to
figure this out and in the second attached image you can see my initial
approach.

Initially I have thought to define a "path" for the profile by a polynomial
equation.  I would then input an x-coordinate value into the function with
the equation and I would get a y-coordinate as an output.  The problem is
that when you actually go and make this a macro, how can I determine the
change in the x value so it will give me the correct y value and STILL have
the sphere be tangential?   In other words how do I determine the
x-coordinate to input into the function that gives me the appropriate y
value?  Well I imagined that the change in x could be (as shown in the
diagram):

radius1*(sin theta1) + radius2(sin theta2)

I have figured out how to determine the radius for each sphere of any ring
size, but I simply can not figure out how to determine the "thetas" of which
to use for my equation.  Am I way off?  Is there an easier way to do this?

F. Audet has put up his Apple code which does something similar, and I have
looked at it, but I am trying to understand how I can figure the math so
that I can become more adept at making what I want.  Thanks for your time
and help I appreciate it a great deal since it has helped me realize the
images I see in my head :)

Arie


Post a reply to this message


Attachments:
Download 'pathSpheres.jpg' (43 KB) Download 'cylinderSpheres.jpg' (63 KB)

Preview of image 'pathSpheres.jpg'
pathSpheres.jpg

Preview of image 'cylinderSpheres.jpg'
cylinderSpheres.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.